package com.lqian.demo02.part5.controller;

import com.lqian.demo02.part5.pojo.User;
import com.lqian.demo02.part5.service.UserService;
import com.lqian.demo02.part5.service.UserServiceImpl;
import com.lqian.demo02.part5.service.UserServiceImpl2;
import com.lqian.demo02.utils.DateUtils;

import java.sql.Date;
import java.sql.SQLException;
import java.text.ParseException;
import java.text.SimpleDateFormat;

/**
 * @author：Melody_LQ
 * @time：2022/7/14 6:22 下午
 */
public class UserController {
    private static UserService userService = new UserServiceImpl2();


    public static void main(String[] args) throws SQLException, ParseException {
        User user = new User("bibi","123456","889977@qq.com",Date.valueOf("2001-09-04"));
        boolean b = userService.addUser(user);
        if (b){
            System.out.println("add success!");
        }else {
            System.out.println("add fail");
        }
    }
}
